package com.model;

import dev.langchain4j.model.chat.ChatModel;
import dev.langchain4j.model.chat.StreamingChatModel;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author nbZhuozh
 * @Date 2025-07-16  20:34
 **/
public class ModelFactory {

    private String defaultModel;

    private final ConcurrentHashMap<String, ChatModel> chatModelMap = new ConcurrentHashMap<>();

    private final ConcurrentHashMap<String, StreamingChatModel> streamingChatModelMap = new ConcurrentHashMap<>();

    private String defaultAssistant;

    public ChatModel getChatModel(String modelId) {
        return chatModelMap.get(modelId);
    }

    public StreamingChatModel getStreamingChatModel(String modelId) {
        return streamingChatModelMap.get(modelId);
    }

    public String defaultAssistant(){
        return defaultAssistant;
    }
}
